package design2.chain_of_responsibility.example.server;

import java.util.HashMap;
import java.util.Map;

/**
 * 用户信息
 */
public class UserInfo {

	private Map<String,String> users=new HashMap<>();

	public void register(String email,String password){
		users.put(email, password);
	}


	public Boolean hasEmail(String email){
		return users.containsKey(email);
	}

	public  boolean isValidPassword(String email,String password){
		return users.get(email).equals(password);
	}
}
